﻿<UserControl  x:Class="MemoBoss.Options"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:MemoBoss"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignWidth="480" d:DesignHeight="800">
    <UserControl.Resources>
        <local:AppSettings x:Key="appSettings"></local:AppSettings>
        <Storyboard x:Name="Push">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="0.9"/>

            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="0.9"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Release">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="btnOptionsGrid">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.9"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.05" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Hide">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="500"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Collapsed</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="Show"  Completed="Show_Completed">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="500"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
                <DiscreteObjectKeyFrame KeyTime="0" >
                    <DiscreteObjectKeyFrame.Value>
                        <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                </DiscreteObjectKeyFrame>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <TranslateTransform/>
        </Grid.RenderTransform>

        <Grid x:Name="ContentPanel"  Margin="12,0,12,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Grid x:Name="btnBack" Margin="10,10,10,10" Grid.Column="0" VerticalAlignment="Top"  Tap="btnBack_Tap">
                <Image   Stretch="None" Source="/Icons/appbar.back.rest.png"  HorizontalAlignment="Left" />
                <Image   Stretch="None" Source="/Icons/appbar.basecircle.rest.png"  HorizontalAlignment="Left" />
            </Grid>
            <ScrollViewer    Grid.Column="1"  ScrollViewer.VerticalScrollBarVisibility="Hidden"  Margin="0,0,0,10">
                <StackPanel>
                    <TextBlock  x:Name="txtImages"  Text="Images (xx)" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <toolkit:ToggleSwitch x:Name="UseAllOnOff"                                          
                     Content="Use all pictures"                      
                     Checked="UseAllOnOff_Checked"
                     Unchecked="UseAllOnOff_Unchecked"  IsChecked="{Binding Path=UseAllImagesSetting, Mode=TwoWay}"  FontSize="24"  />
                    <Grid x:Name="btnGrdCollection" Margin="30,0,30,30" RenderTransformOrigin="0.5,0.5"  MouseLeftButtonDown="Btn_MouseLeftButtonDown"  MouseLeave="Btn_MouseLeave">
                        <Grid.RenderTransform>
                            <ScaleTransform/>
                        </Grid.RenderTransform>
                        <Rectangle x:Name="btnCollection" Opacity="0.9" RenderTransformOrigin="0.5,0.5" Tap="btnCollection_Tap">
                            <Rectangle.Fill>
                                <ImageBrush ImageSource="/Images/menu3.png" />
                            </Rectangle.Fill>
                        </Rectangle>
                        <TextBlock Margin="20,20,20,20" FontSize="40" TextAlignment="Center" FontFamily="Fonts/OutlineTwelve.ttf#OutlineTwelve" IsHitTestVisible="False">collection</TextBlock>

                    </Grid>
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Image  Grid.Column="0"  Source="/Images/sl_icon_badge_mdpi.png" Stretch="None" />
                        <TextBlock  Grid.Column="1"  Text="Scoreloop account" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    </Grid>
                    <Grid Margin="0,0,30,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>

                        <StackPanel x:Name="stpAccount" Margin="20,20,20,20">
                            <TextBlock x:Name="txtLogin" >user name</TextBlock>
                            <TextBlock x:Name="txtEmail" >email@mail.com</TextBlock>
                        </StackPanel>
                        <Grid Grid.Column="1" x:Name="btnSubmit"  Tap="btnSubmit_Tap" >
                            <Image    Source="/Icons/appbar.edit.rest.png"  />
                            <Image   Source="/Icons/appbar.basecircle.rest.png"  />
                        </Grid>
                        <Border >
                            <TextBlock Margin="20,20,20,20" x:Name="txtLoading" VerticalAlignment="Center" FontSize="22">Loading...</TextBlock>
                        </Border>
                    </Grid>
                    <TextBlock  Text="Music" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <toolkit:ToggleSwitch x:Name="MusicOnOff"                                          
                     Content="On"                      
                     Checked="ToggleSwitch" 
                     Unchecked="ToggleSwitch"  IsChecked="{Binding Path=MusicOnOffSetting, Mode=TwoWay}" FontSize="24"  />
                    <TextBlock  Text="Sound effects" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <toolkit:ToggleSwitch x:Name="SoundEffectsOnOff"                                          
                     Content="On"                      
                     Checked="ToggleSwitch" 
                     Unchecked="ToggleSwitch"  IsChecked="{Binding Path=SoundEffectsOnOffSetting, Mode=TwoWay}" FontSize="24"  />
                    <TextBlock  Text="Pseudo 3D" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
                    <toolkit:ToggleSwitch x:Name="Pseudo3DOnOff"                                          
                     Content="On"                      
                     Checked="ToggleSwitch" 
                     Unchecked="ToggleSwitch"  IsChecked="{Binding Path=Pseudo3DOnOffSetting, Mode=TwoWay}" FontSize="24"  />


                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>
</UserControl>
